<html>
<head>
<link href="../../../Objects/sofa_white.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="contenu">
		
		<center><h3>Creation of a Scene (3/9)</h3></center>
		<center><img src="2_FullObject.png" width="300" name="FullObject" align="middle"></center>
		
		<br><div id="orangeText">Description</div>
		<p>One of the quickest way to model a deformable body is to embed it inside a regular grid. We will simulate only the points of the grid's cells. The description of this grid is made inside a Topology which describes how the particles are connected.</p> 

		<div id="orangeText">Key points</div>
        
        <p>We will add a <b>SpareGridTopology</b>: it only keeps the full cells of this embedded grid.</p>
        
        <p><div id="tutorialAction">Add the component <strong>SparseGridTopology</strong> to the <strong>Object</strong> node.</div></p>
        
        <p>Now that we have a topology in the scene, the <b>MechanicalObject</b> will rely on it, in order to initialize itself.<br> 
                
                To use this component, you have to:
                <ul>
                  <li>Specify the 3d model</li>
                  <li>Specify the resolution of the grid</li>
                </ul></p>
         
         <div id="tutorialAction"><p>Open the <strong>SparseGridTopology</strong> parameters. Find the <strong>fileTopology</strong> section, and click the <strong>...</strong> button, found across from <strong>Filename of the mesh</strong>. Use the file browser to select <strong> /Sofa/share/mesh/dragon.</strong></p>
         
         <p>Switch to the <strong>Property 4/6</strong> tab. Find the section labeled <strong>n</strong>. Change the <strong>grid resolution</strong> from <strong>(2 2 2)</strong> to (7 6 5).</p></div>
               
		<div id="orangeText">Results</div>
        
        <p><div id="tutorialAction">Run in SOFA</div></p>
        
		<p>Now, several particules are created, representing your deformable object: it embeds the visual model we put.</p> 
        
        <p><div id="tutorialAction">Press <strong>Animate</strong>.</div></p>
        
        <p> The particles fall against the Plane we defined <a href="1_FullObject.scn">previously</a>. As no internal force other than a plane is defined, the original shape is not kept.</p>

		<div id="orangeText">Related</div>
        
        <p>Change the 3d mesh for the <b>SparseGridTopology</b>, and the resolution of the grid.</p>
        <p>Edit the <b>MechanicalObject</b> to see the number of particles simulated.</p>
                
                <br><center><h3><a href="1_FullObject.scn">Previous</a> ____________  <a href="3_FullObject.scn">Next</a></center></h3>
	</div>
</body>
</html>
